<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use \dmstr\bootstrap\Tabs;
use yii\helpers\StringHelper;

/**
 * @var yii\web\View $this
 * @var yiike\store\models\OrderStore $model
 * @var yii\widgets\ActiveForm $form
 */

?>

<div class="order-store-form">

    <?php $form = ActiveForm::begin([
            'id' => 'OrderStore',
            'layout' => 'horizontal',
            'enableClientValidation' => true,
            'errorSummaryCssClass' => 'error-summary alert alert-danger',
            'fieldConfig' => [
                'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                'horizontalCssClasses' => [
                    'label' => 'col-sm-2',
                    #'offset' => 'col-sm-offset-4',
                    'wrapper' => 'col-sm-8',
                    'error' => '',
                    'hint' => '',
                ],
            ],
        ]
    );
    ?>

    <div class="">
        <?php $this->beginBlock('main'); ?>

        <p>


            <!-- attribute order_id -->
            <?= $form->field($model, 'order_id')->textInput(['maxlength' => true]) ?>

            <!-- attribute store_id -->
            <?= $form->field($model, 'store_id')->textInput() ?>

            <!-- attribute uid -->
            <?= $form->field($model, 'uid')->textInput() ?>

            <!-- attribute trade_id -->
            <?= $form->field($model, 'trade_id')->textInput(['maxlength' => true]) ?>

            <!-- attribute pay_at -->
            <?= $form->field($model, 'pay_at')->textInput() ?>

            <!-- attribute consumer_code -->
            <?= $form->field($model, 'consumer_code')->textInput() ?>

            <!-- attribute is_pay -->
            <?= $form->field($model, 'is_pay')->textInput() ?>

            <!-- attribute status -->
            <?= $form->field($model, 'status')->textInput() ?>

            <!-- attribute is_refund -->
            <?= $form->field($model, 'is_refund')->textInput() ?>

            <!-- attribute finished_at -->
            <?= $form->field($model, 'finished_at')->textInput() ?>

            <!-- attribute total -->
            <?= $form->field($model, 'total')->textInput(['maxlength' => true]) ?>

            <!-- attribute quan -->
            <?= $form->field($model, 'quan')->textInput(['maxlength' => true]) ?>

            <!-- attribute commision -->
            <?= $form->field($model, 'commision')->textInput(['maxlength' => true]) ?>

            <!-- attribute settlement -->
            <?= $form->field($model, 'settlement')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit1 -->
            <?= $form->field($model, 'credit1')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit2 -->
            <?= $form->field($model, 'credit2')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit3 -->
            <?= $form->field($model, 'credit3')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit4 -->
            <?= $form->field($model, 'credit4')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit5 -->
            <?= $form->field($model, 'credit5')->textInput(['maxlength' => true]) ?>

            <!-- attribute credit3_pay -->
            <?= $form->field($model, 'credit3_pay')->textInput(['maxlength' => true]) ?>

            <!-- attribute real_pay -->
            <?= $form->field($model, 'real_pay')->textInput(['maxlength' => true]) ?>

            <!-- attribute refund_amount -->
            <?= $form->field($model, 'refund_amount')->textInput(['maxlength' => true]) ?>

            <!-- attribute express_at -->
            <?= $form->field($model, 'express_at')->textInput() ?>

            <!-- attribute uniontid -->
            <?= $form->field($model, 'uniontid')->textInput(['maxlength' => true]) ?>

            <!-- attribute express_name -->
            <?= $form->field($model, 'express_name')->textInput(['maxlength' => true]) ?>

            <!-- attribute express_code -->
            <?= $form->field($model, 'express_code')->textInput(['maxlength' => true]) ?>

            <!-- attribute express_no -->
            <?= $form->field($model, 'express_no')->textInput(['maxlength' => true]) ?>
        </p>
        <?php $this->endBlock(); ?>

        <?=
        Tabs::widget(
            [
                'encodeLabels' => false,
                'items' => [
                    [
                        'label'   => Yii::t('models', 'OrderStore'),
                        'content' => $this->blocks['main'],
                        'active'  => true,
                    ],
                ]
            ]
        );
        ?>
        <hr/>

        <?php echo $form->errorSummary($model); ?>

        <?= Html::submitButton(
            '<span class="glyphicon glyphicon-check"></span> ' .
            ($model->isNewRecord ? '保存' : '保存'),
            [
                'id' => 'save-' . $model->formName(),
                'class' => 'btn btn-success'
            ]
        );
        ?>

        <?php ActiveForm::end(); ?>

    </div>

</div>

